import { HTTP } from '../utils/http.js'
let http = new HTTP()
// 广告banner
export const getAdvert = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/Advert/List',
		method: 'POST',
		data
	})
}
// 获取产品类型（线上商品，美食，票务，住宿，导游等）
export const getTicketCategoryTabs = (data) => {
	return http.request({
		url: '/API/Product/GetProductType',//	/InternalAPI/WeiXin/TicketCategory/List
		method: 'POST',
		data
	})
}
// 票务列表
export const getTickettList = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/Ticket/List',
		method: 'POST',
		data
	})
}
// 票务详情
export const  getTicketDetail = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/Ticket/Detail',
		method: 'POST',
		data
	})
}
// 获取家人列表
export const getUsersFamily = () => {
	return http.request({
		url: '/InternalAPI/WeiXin/UsersFamily/List',
		method: 'POST',
		data: {
			Index: 1,
			Size: 99
		}
	})
}
// 获取票务详情日期范围
export const getTicketDateRange = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/TicketSeason/CalendarRange',
		method: 'POST',
		data
	})
}
//	获取最大区间
export const getMaxPreSaleDay = (data) => {
	return http.request({
		url: '/InternalAPI/Settings/GetMaxPreSaleDay',
		method: 'POST',
		data
	})
}
// 获取票务区间与价格
export const getTicketCalendar = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/TicketSeason/CalendarPriceByDate',
		method: 'POST',
		data
	})
}
//获取当前用户最便宜的标签折扣
export const getMinDiscount = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/TicketTagDiscount/GetMinDiscount',
		method: 'POST',
		data
	})
}
//	获取 当个日期的价格区间
export const getTimeSharingByTicket = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/Ticket/GetTimeSharingByTicket',
		method: 'POST',
		data
	})
}
//	新增家庭成员接口
export const saveUsersFamilyAdd = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/UsersFamily/Add',
		method: 'POST',
		data
	})
}
//	修改家庭成员接口
export const saveUsersFamilyUpdate = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/UsersFamily/Update',
		method: 'POST',
		data
	})
}
//	删除家庭成员接口
export const delUsersFamily = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/UsersFamily/Delete',
		method: 'POST',
		data
	})
}
//	提交订单
export const saveSingleOrder = (data) => {
	return http.request({
		url: '/InternalAPI/WeiXin/Orders/AddSingleOrders',
		method: 'POST',
		data
	})
}
